package org.csmzxy.class2333;

public class Max {
    public static void main (String[] args){
        int[] arr = {52,63,1,14,36,95,6,10,27,40};
        int max = arr[0];
        int index =0;
        for (int i =1; i <arr.length; i++){
            if (arr[i] > max) {
                max =arr[i];
                index = i;
            }
        }System.out.println("数组中的最大值是"+max);
        System.out.println("该数组位于数组中的第"+(index +1)+"个位置");
    }
}
